package dominion.player;

import dominion.Dominion;
import dominion.kingdom.Thief;
import dominion.kingdom.Witch;

public class WastePlayer extends TresureOnlyPlayer {

	Witch witch;
	Thief thief;

	public WastePlayer(Dominion dominion) {
		this("Waste", dominion);
	}

	public WastePlayer(String name, Dominion dominion) {
		super(name, dominion);
	}

	@Override
	public int buy(Dominion dominion, int value) {
		if (thief == null && 3 < value) {
			this.thief = new Thief();
			dominion.buy(this, this.thief);
		} else if (this.witch == null && 4 < value) {
			this.witch = new Witch();
			dominion.buy(this, this.witch);
		} else {
			super.buy(dominion, value);
		}
		return 0;
	}

}
